local blaze = require "blaze"

local M = {}

local phrases = blaze.config.load("club/threecard/gamelib/chat_phrase.lua")
local emojis = blaze.config.load("club/threecard/gamelib/chat_emoji.lua")
local unknown_emoji = {
    id = 0,
    res = "club.threecard.gamelib/ui/emojis.b:unknown",
    order = 0
}

local emojis_map = {}
for _, emoji in ipairs(emojis) do
    emojis_map[emoji.id] = emoji
end

M.phrases = phrases
M.emojis = emojis

function M.get_emoji(id)
    return emojis_map[id] or unknown_emoji
end

return M